package com.datamanage.user.service;

import com.datamanage.user.entity.User;
import com.datamanage.user.dto.UserDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

public interface UserService {
    User createUser(UserDTO userDTO);
    
    Optional<User> getUserById(Long id);
    
    Optional<User> getUserByUsername(String username);
    
    Page<User> getAllUsers(Pageable pageable);
    
    User updateUser(Long id, UserDTO userDTO);
    
    void deleteUser(Long id);
    
    boolean existsByUsername(String username);
    
    boolean existsByEmail(String email);
    
    User assignUserToGroup(Long userId, Long groupId);
    
    User assignUserToCompany(Long userId, Long companyId);
}